/**
 * @Date 2020-06-28 14:46:37
 * @Remark
 */

// lib
// config
// script & methods & public
// http
// service
import { simpleListService } from "@/public/service/simple.service";
import store from "@/store";
// api
import {
  API_ADDRESS_PROVINCE,
  ReqAddress,
  ResAddress,
  API_ADDRESS_CITY,
  API_ADDRESS_AREA,
} from "./api";
// interface && type && class
import { AdressDto } from "./model";
// 其它

// 获取所以活动分类
export async function getProvinceService() {
  return simpleListService<ReqAddress, ResAddress, AdressDto>(API_ADDRESS_PROVINCE, {});
}

export async function getCityService(id: number) {
  return simpleListService<ReqAddress, ResAddress, AdressDto>(API_ADDRESS_CITY, { id });
}

export async function getAreaService(id: number) {
  return simpleListService<ReqAddress, ResAddress, AdressDto>(API_ADDRESS_AREA, { id });
}
